﻿using System;
using FFIV.Lib.Utilities;

namespace FFIV.Lib.Model
{
	public class PermissionException : Exception
	{
		private readonly Permissions m_ExceptedPermission;
		private readonly Permissions m_NowPermission;

		public PermissionException()
		{}

		public PermissionException(Permissions exceptedPermission, Permissions nowPermission)
		{
			m_ExceptedPermission = exceptedPermission;
			m_NowPermission = nowPermission;
		}

		public override string ToString()
		{
			return string.Format("This page need the {0} permission, but now the user only has {1} permission.",
								m_ExceptedPermission, m_NowPermission);
		}
	}
}
